package com.psychology.vo;

import lombok.Data;

@Data
public class ClientInfoVO {
    private Long id;
    private String name;
    private String phone;
    private String gender;

    public static ClientInfoVO fromAppointment(Appointment appointment) {
        ClientInfoVO vo = new ClientInfoVO();
        User client = appointment.getClient();
        if (client != null) {
            vo.setId(client.getId());
            vo.setName(client.getName());
            vo.setPhone(client.getPhone());
            vo.setGender(client.getGender());
        }
        return vo;
    }
}